<?php
 	echo $html->link('Add Post',array('controller' => 'posts', 'action' => 'add'));
?>

 <a href="#" id="test">test</a>
<script type="text/javascript">
	$('#test').click(function(){
		$.post("<?php echo $html->url(array('controller'=>'posts','action'=>'test')) ?>",{test: 'OK55555'},function(data){
			alert(data);
		});
		return false;
	});
</script>